The invention relates to a method of encoding n-bit information words, belonging at least to a first group into m-bit code words belonging to a first group, where m&gt;n, within which code words the variation of the digital sum value of said code words relative to the initial value of the digital sum value of said code words is limited to a value corresponding to the variation of a first binary value over p bits and a value corresponding to the variation of a second binary value over q bits, where p.gtoreq.0 and q.gtoreq.0, and which code words exhibit a disparity d, d being an integer within the limits defined by p and q.
In addition, the invention relates to an apparatus for carrying out the method, which apparatus comprises an input for receiving n-bit information words belonging at least to a first group, an output for supplying m-bit code words belonging to a first group, and an encoding device for converting said n-bit information words into m-bit code words in such a way that within said code words, the variation of the digital sum value of said code words relative to the initial value of the digital sum value of said code words is limited to a value corresponding to the variation of a first binary value over p bits and a value corresponding to the variation of a second binary value over q bits, where p.gtoreq.0 and q.gtoreq.0, and said code words exhibit a disparity d, d being an integer within the limits defined by p and q.
The invention also relates to a method of decoding m-bit code words belonging at least to a first group into n-bit information words belonging to a first group, where m&gt;n, within which code words the variation of the digital sum value of said code words relative to the initial value of the digital sum value of said code words is limited to a value corresponding to the variation of a first binary value over p bits and a value corresponding to the variation of a second binary value over q bits, where p.gtoreq.0 and q.gtoreq.0, and which code words exhibit a disparity d, d being an integer within the limits defined by p and q, and the invention also relates to an apparatus for carrying out the method, which apparatus comprises an input for receiving m-bit code words belonging at least to a first group, an output for supplying n-bit information words belonging to a first group, and a decoding device for converting said m-bit code words into n-bit information words, within which code words the variation of the digital sum value of said code words relative to the initial value of the digital sum value of said words is limited to a value corresponding to the variation of a first binary value over p bits and a value corresponding to the variation of a second binary value over q bits, where p.gtoreq.0 and q.gtoreq.0, and which code words exhibit a disparity d, d being an integer within the limits defined by p and q.
Such methods and apparatuses are employed for encoding information words into code words with a limited digital sum value as described in inter alia GB-PS No. 1,540,617 and U.S. Pat. No. 4,387,364, and for decoding such code words into information words.
Such encoding and decoding methods can be carried out by the use of memories containing conversion tables (or "look-up tables"), but this demands a substantial storage capacity. However, it is known inter alia from IEEE Transactions on Information Theory, May 1972, pages 395-399, Schalkwijk, and form the same magazine, December 1973, pages 1438-1441 to arrange code words with a specific disparity (-2 in the Schalkwijk method) lexicographically by means of a Pascal triangle whose elements have been selected in conformity with the Newton binomial, so that the information word can be converted directly into the code word and vice versa by merely storing the elements of said Pascal triangle in the memory. This is possible because via said Pascal triangle sequence numbers are assigned to all the output code words with said disparity. As the sequence numbers form an uninterrupted sequence, an unambiguous code conversion is possible by relating the n-bit input words to said sequence numbers in conformity with their binary weights. However, if, in the same way as the code words of the type defined in the opening paragraph, not all the words with said disparity d are permissible as a result of a limitation of the maximum excursion of the digital sum value within the code words to the limits p and q, this known encoding and decoding method cannot be used. Indeed, some code words of the series of n-bit code words to which sequence numbers have been assigned via the Pascal triangle, are not permissible. Therefore, it is not possible to assign an uninterrupted series of sequence numbers to the permissible code words by means of the Pascal triangle, so that the n-bit information words cannot be mapped onto the m-bit code words, or the other way around, in conformity with their sequence numbers as defined by their binary weights via the Pascal triangle.